//bool, Obj this, Obj other

Unit me;
Ship ship;

me = this.AsUnit();
if(!me.IsValid()) return false;
ship = other.AsShip();
if(!ship.IsValid()) return false;

if(!ship.IsWaterUnit) return false;
if(me.IsWaterUnit) return false;
if(me.IsEnemy(ship)) return false;
if(ship.IsEnemy(me)) return false;
if(ship.UnitsCount == ship.UnitsMax) return false;  

if(me.IsHeirOf("BaseAnimal")) return false;
if(me.IsHeirOf("RamUnit")) return false;
if(me.IsHeirOf("Sentry")) return false;

return true;
